﻿using System;
using System.Net;
using System.Net.Sockets;

namespace libProxy
{
    public class ProxyServerEventArgs : EventArgs
    {
        internal Socket Client;
        internal IProxyServer Server;
        public byte[] Data { get; set; }

        public void Reply(byte[] data)
        {
            Server.Reply(Client, data);
        }
    }

    public interface IProxyServer
    {
        void Start(IPAddress bind,int port);
        void Stop();
        event EventHandler<ProxyServerEventArgs> OnClientRequest;
        void Reply(Socket socket, byte[] bytes);
    }
}